x86/vmx: Calculate model-specific LBRs once at start of day
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Feb 2023 15:58:25 +0000 (16:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Feb 2023 15:58:25 +0000 (16:58 +0100)
commit5e3250258afbace3e5dc3f31ac99c1eebf60f238
tree3ff0263f41fb01a159cd8988ac8c60ef72ef6804
parentc871e05e138aae2ac75e9b4ccebe6cf3fd1a775b
x86/vmx: Calculate model-specific LBRs once at start of day

There is no point repeating this calculation at runtime, especially as it is
in the fallback path of the WRSMR/RDMSR handlers.

Move the infrastructure higher in vmx.c to avoid forward declarations,
renaming last_branch_msr_get() to get_model_specific_lbr() to highlight that
these are model-specific only.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: e94af0d58f86c3a914b9cbbf4d9ed3d43b974771
master date: 2023-01-12 18:42:00 +0000
xen/arch/x86/hvm/vmx/vmx.c